home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Shareware World / Graphics / iView Multimedia 3.4 / Sample Apple Scripts / Sample Scripts < prev    next >
Text File  |  1998-12-13  |  3KB  |  74 lines

  1. tell application "iView Multimedia 3.4"
  2.  
  3.     
  4.     -- •• APPLICATION LEVEL
  5.     -- ---------------------
  6.     -- open file "macos:"                        -- open/print file (folder) examples
  7.     -- open {file "macos:", file "media:"}       -- open list of documents
  8.     -- print file "media:iView catalogs:my catalog"
  9.     
  10.     -- close saving yes                          -- you can also use "quit" with saving no|ask
  11.     -- get properties                            -- get a list of application properties (you may inquire each in isolation)
  12.     -- get the version                           -- get a single property value
  13.     -- count windows
  14.     -- if get the frontmost = false then         -- check if iView Multimedia is in front
  15.     --    activate                               -- ...if false activate it
  16.     -- end if
  17.     
  18.     -- quit                                      -- default (saving ask)
  19.     -- quit saving yes                           -- save without asking (iView Multimedia may still ask for a name)
  20.     -- quit saving no                            -- ignore changes
  21.     
  22.     
  23.     -- •• MARKS
  24.     -- --------
  25.     -- get the name of mark 1
  26.     -- get the name of every mark
  27.     -- set the name of mark 1 to "Signed Off"
  28.     -- get the color of mark 1
  29.     -- get the color of every mark
  30.     -- set the color of mark 1 to {0, 32000, 0}
  31.     -- get the properties of mark 2
  32.     -- set the properties of mark 2 to {name:"In Progress", color:{64000, 32000, 0}}
  33.     
  34.     
  35.     -- •• WINDOW (CATALOG) LEVEL
  36.     -- --------------------------
  37.     -- duplicate window 1                        -- make an exact copy of the catalog>
  38.     -- get the name of every window              -- getting a list of opened catalogs
  39.     -- copy the bounds of window 1 to myRect     -- getting and setting the size of a window
  40.     -- copy (item 3 of myRect) + 10 to w
  41.     -- copy (item 4 of myRect) + 10 to h
  42.     -- copy w to item 3 of myRect
  43.     -- copy h to item 4 of myRect
  44.     -- set the bounds of window 1 to myRect
  45.     -- get properties of window 1                -- get a full list of window properties
  46.     
  47.     -- making and saving catalogs
  48.     -- open file "macos:utilities:"
  49.     -- activate
  50.     -- repeat while the importing of window 1 is true
  51.     -- do something here...
  52.     -- end repeat
  53.     -- save window 1 in file "media:test.cat"
  54.     -- close window 1
  55.     
  56.     -- counting/finding open windows
  57.     -- repeat with i from 1 to 3
  58.     --    make window
  59.     -- end repeat
  60.     -- count (windows whose name contains "Catalog")
  61.     
  62.     
  63.     -- •• OBJECT (MEDIA) LEVEL
  64.     -- -----------------------
  65.     -- get the properties of object 1 of window 1
  66.     -- get the name of every object of window 1
  67.     -- set the name of object 11 of window 1 to "help italian"
  68.     -- tell window 1
  69.         -- get the name of every object whose mark id is 1
  70.         -- set the mark id of every object whose name contains "ela" to 7
  71.     -- end tell
  72.     
  73.     
  74. end tell